﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Moxiecode.TinyMCE.Web.Controls
{
    public class Plugin
    {
        public string Name { get; set; }

        private List<string> _buttons;
        public List<string> Buttons
        {
            get { return _buttons; }
            set { _buttons = value; }
        }

        public Plugin() : this(null) { }
        public Plugin(string name) : this(name, null) { }
        public Plugin(string name, IEnumerable<string> buttons)
        {
            //if (name == null) throw new ArgumentNullException("name");
            if (name == String.Empty) throw new ArgumentException("The name of the plugin cannot be empty.", "name");
            Name = name;
            Buttons = (buttons == null) ? new List<string>() : new List<string>(buttons);
        }

        public override string ToString()
        {
            return Name.ToLower();
        }
    }
}
